<%@ Page Language="C#" MasterPageFile="~/MyMasterPage.master" AutoEventWireup="true" CodeFile="News.aspx.cs" Inherits="NewDetails" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <% string siteDirName =Application["siteDirName"].ToString(); %>
<% string extension = Application["extension"].ToString(); %>   
     <div class="right_side">
	   <div class="nav">
	       
	          <h2>Latest News: </h2>
                   <ul>
                     <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:Personal %>"
                       SelectCommand="SELECT TOP(10) [id], [NewsTitle], [NewsCaption], [NewsDetails],REPLACE(NewsTitle, ' ', '-') AS NewsTitleLinks, [NewsDate],DAY(NewsDate) AS date, MONTH(NewsDate) AS month, YEAR(NewsDate) AS year, [IsPublished] FROM [News] ORDER BY [NewsDate] desc"></asp:SqlDataSource>
                      <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource5">
                        <ItemTemplate>
                         <li>
                            <a href="<%=Application["siteDirName"].ToString() %>News/<%# Eval("date")%>/<%# Eval("month")%>/<%# Eval("year")%>/<%# Eval("id")%>/<%# Eval("NewsTitleLinks")%><%=Application["extension"].ToString()%>"><%# Eval("NewsTitle")%></a>
                        </li>
                        </ItemTemplate>
                      </asp:Repeater>
                  
                  </ul>
                  
                  
                  <br /><br />
		          <h2>RSS Feeds:</h2>
		          <ul>
		            
		            <li><a href='<%=siteDirName %>media/feeds/NewsRSS.xml'>
		                 <img alt='click here to news feed'
		                 title='click here to news feed'
		                  src='<%=siteDirName %>media/feeds/rss.png' />
		                <span  style="vertical-align:top"><b>News Feed</b></span> 
		                </a>
	                 </li>
	                 <li><a href="http://www.addthis.com/feed.php?pub=saiket&h1=<%=siteDirName %>media/feeds/NewsRSS.xml" 
                             target="_blank" title="Subscribe News Feed using any feed reader!">
                            <img src="http://s9.addthis.com/button1-fd.gif"
                            width="125" height="16" border="0" alt="Subscribe News Feed using any feed reader!" />
                         </a>
		            </li>
		          </ul>
                 <br /><br /> 
   	  </div>
	</div>
    
        <div class="left_side" style="text-align: justify">
        <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
         <ItemTemplate>
                       <h2><asp:Label ID="NewsTitleLabel" runat="server" Text='<%# Eval("NewsTitle") %>'></asp:Label></h2>
                       <h3><asp:Label ID="NewsCaptionLabel" runat="server" Text='<%# Eval("NewsCaption") %>'></asp:Label></h3>
                     <div class="padding" style="text-align: justify">
		                    <div class="img"><img alt='<%# Eval("NewsTitle") %>'   src="<%=Application["siteDirName"].ToString() %>media/news/<%# Eval("id")%>.png" /></div>
		                    <asp:Label ID="NewsLabel" runat="server" Text='<%# Eval("NewsDetails") %>'></asp:Label>
                      </div>    
                       <p class="date"> 
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("NewsDate") %>'></asp:Label>
                      </p>                       
	     </ItemTemplate>	
	    </asp:DataList>
	 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Personal %>"
        SelectCommand="SELECT * FROM [News] order by newsdate desc"></asp:SqlDataSource>
          </div>
  
</asp:Content>

